package com.tianqu.tms.entity;

import java.sql.Timestamp;

import com.tianqu.tms.core.base.TmsEntity;
import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.core.exception.TmsException;
import com.tianqu.tms.dao.AucBidhistoryDao;
import com.tianqu.tms.dao.CheckInfoPicDao;
import com.tianqu.tms.dao.TmsDao;
import com.tianqu.tms.dto.CheckInfoPicDto;

public class CheckInfoPic extends TmsEntity {

	private static final long serialVersionUID = -3897771713511000962L;
	private int id;
	private String serial;
	// 左前车图
	private String carImages1;
	// 右前车图
	private String carImages2;
	// 左后车图
	private String carImages3;
	// 右后车图
	private String carImages4;
	// 受理日期
	private Timestamp insertTime;
	// 受理人
	private int insertUserId;
	// 更新时间
	private Timestamp updateTime;
	// 更新用户
	private int updateUserId;

	public static CheckInfoPic gegetInstance() {
		CheckInfoPic pic = new CheckInfoPic();
		pic.setExisting(false);
		return pic;
	}

	/**
	 * 插入图片信息
	 * 
	 * @throws TmsDaoException
	 */
	public void saveImage(CheckInfoPic pic) throws TmsDaoException {
		CheckInfoPicDao dao = (CheckInfoPicDao) TmsDao.getInstance(TmsDao.TMS_CHECK_INFO_PIC);
		CheckInfoPicDto dto = new CheckInfoPicDto();
		dto.setSerial(pic.getSerial());
		// 左前车图
		dto.setCarImages1(pic.getCarImages1());
		// 右前车图
		dto.setCarImages2(pic.getCarImages2());
		// 左后车图
		dto.setCarImages3(pic.getCarImages3());
		// 右后车图
		dto.setCarImages4(pic.getCarImages4());
		// 受理人
		dto.setInsertUserId(pic.getInsertUserId());
		// 更新人
		dto.setUpdateUserId(pic.getUpdateUserId());
		dao.saveImage(dto);
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSerial() {
		return serial;
	}

	public void setSerial(String serial) {
		this.serial = serial;
	}

	public String getCarImages1() {
		return carImages1;
	}

	public void setCarImages1(String carImages1) {
		this.carImages1 = carImages1;
	}

	public String getCarImages2() {
		return carImages2;
	}

	public void setCarImages2(String carImages2) {
		this.carImages2 = carImages2;
	}

	public String getCarImages3() {
		return carImages3;
	}

	public void setCarImages3(String carImages3) {
		this.carImages3 = carImages3;
	}

	public String getCarImages4() {
		return carImages4;
	}

	public void setCarImages4(String carImages4) {
		this.carImages4 = carImages4;
	}

	public Timestamp getInsertTime() {
		return insertTime;
	}

	public void setInsertTime(Timestamp insertTime) {
		this.insertTime = insertTime;
	}

	public int getInsertUserId() {
		return insertUserId;
	}

	public void setInsertUserId(int insertUserId) {
		this.insertUserId = insertUserId;
	}

	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	public int getUpdateUserId() {
		return updateUserId;
	}

	public void setUpdateUserId(int updateUserId) {
		this.updateUserId = updateUserId;
	}

	@Override
	public void save() throws TmsDaoException, TmsException {

	}

}
